package com.esteel.settlement.controller;

import javax.servlet.http.HttpServletRequest;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 调用支付接口使用的错误处理类
 * @author zhangxiuzhi
 *
 */
@ControllerAdvice(assignableTypes=PayController.class)
public class PayExceptionHandler {
	
	 @ExceptionHandler(Exception.class)
	 @ResponseBody
	 public String PaException(HttpServletRequest request, Exception ex){
		 return "rspCode=000001&rspMsg="+ex.getMessage();
	 }

}
